package org.codingq92.basic.io.bio;

import java.net.ServerSocket;
import java.net.Socket;

/**
 * BIO传输文件Server端
 *
 * @author: CodingQ92
 * @date: 2025/6/24 21:57
 */
public class BIOFileServer {
    public static void main(String[] args) {
        try {
            ServerSocket serverSocket = new ServerSocket(18000);
            while (true) {
                Socket accept = serverSocket.accept();
                System.out.println(accept.getRemoteSocketAddress() + "开始传输数据>>>>");
                new BIOServerHandler(accept).start();
            }
        } catch (Exception e) {
            e.printStackTrace();
        }
    }
}
